<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8"/>
        <meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
            <title>
                layui模板
            </title>
            <link href="../img/home.png" rel="icon" sizes="120x120" type="image/png">
                <link href="../../layui/dist/css/layui.css" rel="stylesheet" type="text/css">
                </link>
            </link>
        </meta>
    </head>
    <body class="layui-layout-body">
        <div class="layui-layout layui-layout-admin">
            <!-- 顶部菜单 -->
            <div class="layui-header">
            </div>
            <!-- 侧边栏 -->
            <div class="layui-side layui-bg-black">
            </div>
            <!-- 右侧快 -->
            <div class="layui-body">
                <!-- 表单模块 -->
                <div class="myform layui-container">
                </div>
            </div>
        </div>
    </body>
</html>
<script src="../../layui/dist/layui.js">
</script>
<script src="../js/mylayer.js">
</script>
<script src="../../jquery-3.4.1/jquery-3.4.1.min.js">
</script>
<script>
    $(".layui-header").load("header.html");
    $(".layui-side").load("side.html");
    $(".myform").load("form.html");
</script>
<script>
    layui.use('element', function() {
        var element = layui.element;
    });

    //监听表单提交
    layui.use(['form','layer'], function() {
    	var form = layui.form;
    	var layer = layui.layer;
  		form.on('submit(formDemo)', function(data){
  			layer.open({
  				'title': '0',//默认0
  				'title': '标题',
  				'content': '提示内容'
  			});
  			// alert('ghjkl');
    		// layer.msg(JSON.stringify(data.field));
    	return false;
  		
  		});
    });
</script>
